import request from '@/utils/request'
import axios from 'axios'

export function login(params) {
  return axios.post(
    'http://localhost:8081/user/login',
    params, {
      'Content-Type': 'application/json'
    }
  )
  // return request({
  //   url: '/user/login',
  //   method: 'post',
  //   data: {phone: '15687357813', password: '123456'},
  //   headers: {
  //     'Content-Type': 'application/json'
  //   }
  // })
}

export async function getInfo() {
  return request({
    url: '/user/userinfo',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}
